home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / FWNotifn / FWNotifi.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.7 KB  |  94 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                FWNotifi.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef FWNOTIFI_H
  11. #define FWNOTIFI_H
  12.  
  13. #ifndef FWSTDDEF_H
  14. #include "FWStdDef.h"
  15. #endif
  16.  
  17. #ifndef FWINTERE_H
  18. #include "FWIntere.h"
  19. #endif
  20.  
  21. //========================================================================================
  22. // Forward declarations
  23. //========================================================================================
  24.  
  25. class FW_CInterest;
  26. class FW_MNotifier;
  27.  
  28. //========================================================================================
  29. // CLASS FW_CNotification
  30. //========================================================================================
  31.  
  32. class FW_CNotification
  33. {
  34. public:
  35.     FW_DECLARE_CLASS
  36.  
  37.     FW_CNotification();
  38.     FW_CNotification(const FW_CInterest& interest);
  39.     FW_CNotification(const FW_CNotification& other);
  40.     virtual ~FW_CNotification();
  41.     
  42.     FW_CNotification&    operator=(const FW_CNotification& other);
  43.     
  44.     FW_Boolean            operator==(const FW_CNotification& other) const;
  45.     FW_Boolean            operator!=(const FW_CNotification& other) const;
  46.  
  47.     const FW_CInterest&    GetInterest() const;
  48.     void                SetInterest(const FW_CInterest& interest);
  49.     
  50.     FW_Message            GetMessage() const;
  51.     FW_MNotifier*        GetNotifier() const;
  52.  
  53. private:
  54.     FW_CInterest        fInterest;
  55. };
  56.  
  57. //----------------------------------------------------------------------------------------
  58. // FW_CNotification::GetInterest
  59. //----------------------------------------------------------------------------------------
  60.  
  61. inline const FW_CInterest& FW_CNotification::GetInterest() const
  62. {
  63.     return fInterest;
  64. }
  65.  
  66. //----------------------------------------------------------------------------------------
  67. // FW_CNotification::GetMessage
  68. //----------------------------------------------------------------------------------------
  69.  
  70. inline FW_Message FW_CNotification::GetMessage() const
  71. {
  72.     return fInterest.GetMessage();
  73. }
  74.  
  75. //----------------------------------------------------------------------------------------
  76. // FW_CNotification::GetNotifier
  77. //----------------------------------------------------------------------------------------
  78.  
  79. inline FW_MNotifier* FW_CNotification::GetNotifier() const
  80. {
  81.     return fInterest.GetNotifier();
  82. }
  83.  
  84. //----------------------------------------------------------------------------------------
  85. // FW_CNotification::operator!=
  86. //----------------------------------------------------------------------------------------
  87.  
  88. inline FW_Boolean FW_CNotification::operator!=(const FW_CNotification& other) const
  89. {
  90.     return !(*this == other);
  91. }
  92.  
  93. #endif
  94.